package com.madcode.landlordbuddy.dao;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class PropertyDAO  extends HibernateDaoSupport {
	private Logger logger =  Logger.getLogger(PropertyDAO.class);

	public List<Property> getProperties(){
		logger.debug("getProperties()");
		HibernateTemplate ht = this.getHibernateTemplate();
		return ht.find("from Property");
	}
	public Property getProperty(Long id){
		logger.debug("getProperty with id <" + id + ">");
		Property property = new Property();


		return property;
	}

	public void saveProperty(Property property){
		logger.debug("saving property with id <" + property.getId() + ">");
		getHibernateTemplate().saveOrUpdate(property);
	}

	public void removeProperty(Long id){
		logger.debug("removing property with id <" + id + ">");

	}

}
